package org.xb.SimpleFactory;

public class ClashFactory {
    public static CashSuper createCashAccept(String type){
        CashSuper cs = null;
        switch (type){
            case "正常收费":
                cs = new CashNormal();
                break;
            case "打八折":
                cs = new CashRebate(0.8);
                break;
            case "满300反100":
                cs = new ClashReturn(300d,100d);
                break;
        }
        return cs;
    }
}
